﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WHC.Hotel.Entity
{
    public class RoomUseInfo
    {

        public RoomUseInfo(string key, int inUse, int canUse)
        {

            this.m_InUse = inUse;
            this.m_CanUse = canUse;
            this.m_Key = key;


        }



        private string m_Key = string.Empty;

        /// <summary>
        /// 唯一标识
        /// </summary>
        public string Key
        {
            get { return m_Key; }
            set { m_Key = value; }
        }
        private int m_InUse = 0;


        /// <summary>
        /// 已租数
        /// </summary>
        public int InUse
        {
            get { return m_InUse; }
            set { m_InUse = value; }
        }

        private int m_RoomSum = 0;


        /// <summary>
        /// 总房数
        /// </summary>
        public int RoomSum
        {
            get { return m_RoomSum; }
            set { m_RoomSum = value; }
        }



        private int m_CanUse = 0;

        /// <summary>
        /// 可租数
        /// </summary>
        public int CanUse
        {
            get { return m_CanUse; }
            set { m_CanUse = value; }
        }
        private string m_InUseRate = "0%";

        /// <summary>
        /// 入住率
        /// </summary>
        public string InUseRate
        {
            get { return (Convert.ToDouble(InUse) / Convert.ToDouble(RoomSum)).ToString("P2"); }
            set { m_InUseRate = value; }
        }

        private string m_Expand = string.Empty;

        /// <summary>
        /// 扩展字段
        /// </summary>
        public string Expand
        {
            get { return m_Expand; }
            set { m_Expand = value; }
        }

    }
}
